//
//  NoteDetailImageCel.m
//  DogeLegs
//
//  Created by 宋华 on 2017/8/21.
//  Copyright © 2017年 宋华. All rights reserved.
//

#import "NoteDetailImageCel.h"

@interface NoteDetailImageCel () {

}
@property (weak, nonatomic) IBOutlet UIImageView *contentImageview;


@end

@implementation NoteDetailImageCel

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)cellWillDisplay:(ImageMode *)imageMode {
    if (imageMode.sourceType == ImageSourceType_local) {
        self.contentImageview.image = imageMode.localImg;
    } else if (imageMode.sourceType == ImageSourceType_net) {
        [self.contentImageview sd_setImageWithURL:[NSURL URLWithString:imageMode.imageUrl] placeholderImage:[UIImage imageNamed:@"addImage"]];
    }
}

@end
